﻿using System;
using System.IO;
using UnityEngine;

// Token: 0x02000657 RID: 1623
public class FileData
{
	// Token: 0x0600269C RID: 9884 RVA: 0x00148404 File Offset: 0x00146604
	public FileData(string rootName = "")
	{
		this.rootName = rootName;
	}

	// Token: 0x0600269D RID: 9885 RVA: 0x00148420 File Offset: 0x00146620
	public virtual string Create(string name)
	{
		string text = this.Path + name;
		if (!Directory.Exists(text))
		{
			Directory.CreateDirectory(text);
		}
		return text + '/';
	}

	// Token: 0x17000412 RID: 1042
	// (get) Token: 0x0600269E RID: 9886 RVA: 0x0014845C File Offset: 0x0014665C
	public string Path
	{
		get
		{
			string text;
			if (Application.isEditor || Application.platform == RuntimePlatform.WindowsPlayer)
			{
				text = Application.dataPath + "/../";
			}
			else
			{
				text = Application.persistentDataPath + "/";
			}
			if (this.rootName != string.Empty)
			{
				text = text + this.rootName + '/';
			}
			return text;
		}
	}

	// Token: 0x04002DC5 RID: 11717
	protected string rootName = string.Empty;
}
